package com.xiashitech.apiservice.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Data
@Component
@RefreshScope
@ConfigurationProperties(prefix = "agent")
public class AgentConfig {
    private List<String> usernamekey;
    private List<String> userid;
    private String authservice;
    private String userinfoservice;
    private String apiservice;
    private String apiParamService;
    private String desenseservice;
    private String apiRecordSizeRuleService;
    private String waterMarkService;
    private String waterMarkConfigService;
    private String waterMarkPaths;
    private String waterMarkStatusService;
    private Map<String,String> systemAppCode;
    private Map<String,String> systemSign;
    private Map<String,String> systemJwtKey;
    private Map<String,String> jwtUserKey;
    private Map<String,String> jwtCookieKey;
    private Map<String,String> useridpath;
    private Map<String,String> userSessionKey;
    private Map<String,String> accessToken;
    private Map<String,String> loginName;
    private Map<String,String> loginPath;
    private Map<String,Boolean> httpWrapper;
    private Map<String,Boolean> apiRecordSizeRule;
    private Boolean captureApi;
    private Map<String,String> desenseImpl;
    //预留一组通用配置，防止对其他配置项的语义乱用。可以是JSON或常规字符串。特定项目的非标准化配置项配在这。
    private Map<String,String> generalConfig;
    // SanitizerFactory 使用，如果明确配置某个 SystemID 为[server]模式则通过调用AgentServer来补全权限信息。配置为[local]或者不配置，则走本地数据库补全权限信息。
    private Map<String,String> sqlSanitizer;
}
